home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / FTIME.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  410 b   |  14 lines

  1. /*  ftime.c        Turbo C Bible Functions, p. 332.  */
  2. #include <stdio.h>
  3. #include <\tc\include\sys\types.h>
  4. #include <\tc\include\sys\timeb.h>
  5. #include <time.h>
  6. main()
  7. {
  8.     struct timeb time_buffer;
  9.     char *date_time;
  10.     ftime(&time_buffer);
  11.         /* Use "ftime" to get current time into time_buffer */
  12.     printf("Time = %s", ctime(&time_buffer.time));
  13.         /* Convert "time" field to a string and print it */
  14. }